package com.example.barcodeapp.ui.home.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.appcompat.widget.Toolbar;

import com.example.barcodeapp.R;
import com.example.barcodeapp.base.BaseActivity;
import com.example.barcodeapp.interfaces.IBasePersenter;
import com.example.barcodeapp.utils.Show;

import butterknife.BindView;
import butterknife.ButterKnife;

public class YuYueActivity extends BaseActivity {
    @BindView(R.id.iv_back_circle)
    ImageView ivBackCircle;
    @BindView(R.id.ff_back_contener)
    FrameLayout ffBackContener;
    @BindView(R.id.iv_back)
    ImageView ivBack;
    @BindView(R.id.tv_location)
    TextView tvLocation;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.ll_to_search)
    LinearLayout llToSearch;
    @BindView(R.id.right_iv)
    ImageView rightIv;
    @BindView(R.id.right_iv_two)
    ImageView rightIvTwo;
    @BindView(R.id.tv_rught_)
    TextView tvRught;
    @BindView(R.id.tv_right_two)
    TextView tvRightTwo;
    @BindView(R.id.toolBar)
    Toolbar toolBar;
    @BindView(R.id.linearLayout)
    LinearLayout linearLayout;
    @BindView(R.id.linearLayout2)
    LinearLayout linearLayout2;
    @BindView(R.id.tett_1)
    TextView tett1;
    @BindView(R.id.tett_2)
    TextView tett2;
    @BindView(R.id.tett_3)
    TextView tett3;
    @BindView(R.id.tett_4)
    TextView tett4;
    @BindView(R.id.tett_5)
    TextView tett5;
    @BindView(R.id.tett_6)
    TextView tett6;
    @BindView(R.id.tett_queren)
    TextView tettQueren;
    int id=0;

    @Override
    protected int getLayout() {
        return R.layout.activity_yu_yue;
    }

    @Override
    protected void initView() {
        setToolBar(true, false, true, false, false);
        setTitle("预约课程", R.color.black, R.color.white);
        tett1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                id=1;
                tett1.setBackgroundResource(R.drawable.button_yuan);
                tett2.setBackgroundResource(R.drawable.bg_white_radius2);
                tett3.setBackgroundResource(R.drawable.bg_white_radius2);
                tett4.setBackgroundResource(R.drawable.bg_white_radius2);
                tett5.setBackgroundResource(R.drawable.bg_white_radius2);
                tett6.setBackgroundResource(R.drawable.bg_white_radius2);

            }
        });
        tett2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                id=2;

                tett2.setBackgroundResource(R.drawable.button_yuan);
                tett1.setBackgroundResource(R.drawable.bg_white_radius2);
                tett3.setBackgroundResource(R.drawable.bg_white_radius2);
                tett4.setBackgroundResource(R.drawable.bg_white_radius2);
                tett5.setBackgroundResource(R.drawable.bg_white_radius2);
                tett6.setBackgroundResource(R.drawable.bg_white_radius2);
            }
        });
        tett3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                id=3;

                tett3.setBackgroundResource(R.drawable.button_yuan);
                tett2.setBackgroundResource(R.drawable.bg_white_radius2);
                tett1.setBackgroundResource(R.drawable.bg_white_radius2);
                tett4.setBackgroundResource(R.drawable.bg_white_radius2);
                tett5.setBackgroundResource(R.drawable.bg_white_radius2);
                tett6.setBackgroundResource(R.drawable.bg_white_radius2);
            }
        });
        tett4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                id=4;

                tett4.setBackgroundResource(R.drawable.button_yuan);
                tett2.setBackgroundResource(R.drawable.bg_white_radius2);
                tett3.setBackgroundResource(R.drawable.bg_white_radius2);
                tett1.setBackgroundResource(R.drawable.bg_white_radius2);
                tett5.setBackgroundResource(R.drawable.bg_white_radius2);
                tett6.setBackgroundResource(R.drawable.bg_white_radius2);
            }
        });
        tett5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                id=5;

                tett5.setBackgroundResource(R.drawable.button_yuan);
                tett2.setBackgroundResource(R.drawable.bg_white_radius2);
                tett3.setBackgroundResource(R.drawable.bg_white_radius2);
                tett4.setBackgroundResource(R.drawable.bg_white_radius2);
                tett1.setBackgroundResource(R.drawable.bg_white_radius2);
                tett6.setBackgroundResource(R.drawable.bg_white_radius2);
            }
        });
        tett6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                id=6;

                tett6.setBackgroundResource(R.drawable.button_yuan);
                tett2.setBackgroundResource(R.drawable.bg_white_radius2);
                tett3.setBackgroundResource(R.drawable.bg_white_radius2);
                tett4.setBackgroundResource(R.drawable.bg_white_radius2);
                tett5.setBackgroundResource(R.drawable.bg_white_radius2);
                tett1.setBackgroundResource(R.drawable.bg_white_radius2);
            }
        });
        tettQueren.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (id==0){
                    Show.showMessage("请选择科目");
                }else {
                    startActivity(new Intent(YuYueActivity.this, RiLiActivity.class));
                }

            }
        });
    }

    @Override
    protected IBasePersenter initPersenter() {
        return null;
    }

    @Override
    protected void initData() {

    }


}